#     Goblinoid: Experience all of MediaGoblin on an Android Device
#     Copyright (C) 2015 Dylan Jeffers 
# 
#     This program is free software: you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation, either version 3 of the License, or
#     (at your option) any later version.
# 
#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
# 
#     You should have received a copy of the GNU General Public License
#     along with this program.  If not, see <http://www.gnu.org/licenses/>.

#:import utils kivy.utils

<OptionIcon>:

<OptionsButton>:
    background_normal: ''
    background_down: ''
    icon_source: ''
    background_color: utils.get_color_from_hex("#86D4B1")
    allow_no_selection: False 
    OptionIcon:
        source: root.icon_source
        size_hint_y: None
        height: root.height - sp(10)
        x: root.x + (root.width / 2 - self.width / 2)
        y: sp(5)

<ButtonDivider@Widget>:
    size_hint_x: None
    width: sp(2)
    canvas:
        Color:
            rgba: 0,0,0,0.05
        Rectangle:
            pos: self.pos
            size: self.size


<OptionsBar>:
    anchor_y: 'bottom'
    size_hint_y: None
    height: sp(60)
    BoxLayout:
        cols: 3 
        OptionsButton:
            id: feed
            name: 'feed'
            group: 'options'
            delegate: root
            state_normal_source: 'images/feed_icon_normal.png'
            state_down_source: 'images/feed_icon_down.png'
            icon_source: feed.state_down_source if feed.state == 'down' else feed.state_normal_source
        OptionsButton:
            id: upload
            name: 'upload'
            delegate: root
            state_normal_source: 'images/upload_icon_normal.png'
            state_down_source: 'images/upload_icon_down.png'
            icon_source: upload.state_normal_source
        OptionsButton:
            id: profile
            name: 'profile'
            group: 'options'
            delegate: root
            state_normal_source: 'images/profile_icon_normal.png'
            state_down_source: 'images/profile_icon_down.png'
            icon_source: profile.state_down_source if profile.state == 'down' else profile.state_normal_source


<ActionLayout>:
    BoxLayout:
        orientation: 'vertical'
        ActionScreenManager:
            id: sm
            screen_stack: root.screen_stack
            screen_provider: root.screen_provider
            transition: root.sm_transition
            delegate: root
        OptionsBar:
            id: options_bar
            delegate: root
